.class public Lde/dealdoktor/app/fragments/DetailFragment$LoadCommentsTask;
.super Landroid/os/AsyncTask;
.source "DetailFragment.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lde/dealdoktor/app/fragments/DetailFragment;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x4
    name = "LoadCommentsTask"
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Landroid/os/AsyncTask",
        "<",
        "Ljava/lang/String;",
        "Ljava/lang/Void;",
        "Ljava/lang/Boolean;",
        ">;"
    }
.end annotation


# instance fields
.field private comments:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Lde/dealdoktor/app/data/CommentDAO;",
            ">;"
        }
    .end annotation
.end field

.field private ctx:Ljava/lang/ref/WeakReference;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/lang/ref/WeakReference",
            "<",
            "Lde/dealdoktor/app/fragments/DetailFragment;",
            ">;"
        }
    .end annotation
.end field

.field final synthetic this$0:Lde/dealdoktor/app/fragments/DetailFragment;


# direct methods
.method public constructor <init>(Lde/dealdoktor/app/fragments/DetailFragment;Ljava/lang/ref/WeakReference;)V
    .locals 1
    .parameter
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/ref/WeakReference",
            "<",
            "Lde/dealdoktor/app/fragments/DetailFragment;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 449
    .local p2, act:Ljava/lang/ref/WeakReference;,"Ljava/lang/ref/WeakReference<Lde/dealdoktor/app/fragments/DetailFragment;>;"
    iput-object p1, p0, Lde/dealdoktor/app/fragments/DetailFragment$LoadCommentsTask;->this$0:Lde/dealdoktor/app/fragments/DetailFragment;

    .line 446
    invoke-direct {p0}, Landroid/os/AsyncTask;-><init>()V

    .line 447
    iput-object p2, p0, Lde/dealdoktor/app/fragments/DetailFragment$LoadCommentsTask;->ctx:Ljava/lang/ref/WeakReference;

    .line 448
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment$LoadCommentsTask;->ctx:Ljava/lang/ref/WeakReference;

    invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lde/dealdoktor/app/fragments/DetailFragment;

    #getter for: Lde/dealdoktor/app/fragments/DetailFragment;->currentPost:Lde/dealdoktor/app/data/PostDAO;
    invoke-static {v0}, Lde/dealdoktor/app/fragments/DetailFragment;->access$0(Lde/dealdoktor/app/fragments/DetailFragment;)Lde/dealdoktor/app/data/PostDAO;

    move-result-object v0

    iget-object v0, v0, Lde/dealdoktor/app/data/PostDAO;->comments:Ljava/util/ArrayList;

    iput-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment$LoadCommentsTask;->comments:Ljava/util/ArrayList;

    return-void
.end method


# virtual methods
.method protected varargs doInBackground([Ljava/lang/String;)Ljava/lang/Boolean;
    .locals 3
    .parameter "args"

    .prologue
    .line 471
    const/4 v0, 0x0

    .local v0, i:I
    :goto_0
    iget-object v1, p0, Lde/dealdoktor/app/fragments/DetailFragment$LoadCommentsTask;->comments:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v1

    if-lt v0, v1, :cond_0

    .line 474
    const/4 v1, 0x1

    invoke-static {v1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v1

    return-object v1

    .line 472
    :cond_0
    iget-object v1, p0, Lde/dealdoktor/app/fragments/DetailFragment$LoadCommentsTask;->ctx:Ljava/lang/ref/WeakReference;

    invoke-virtual {v1}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lde/dealdoktor/app/fragments/DetailFragment;

    iget-object v2, p0, Lde/dealdoktor/app/fragments/DetailFragment$LoadCommentsTask;->comments:Ljava/util/ArrayList;

    invoke-virtual {v2, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lde/dealdoktor/app/data/CommentDAO;

    invoke-virtual {v1, v2}, Lde/dealdoktor/app/fragments/DetailFragment;->addComment(Lde/dealdoktor/app/data/CommentDAO;)V

    .line 471
    add-int/lit8 v0, v0, 0x1

    goto :goto_0
.end method

.method protected bridge varargs synthetic doInBackground([Ljava/lang/Object;)Ljava/lang/Object;
    .locals 1
    .parameter

    .prologue
    .line 1
    check-cast p1, [Ljava/lang/String;

    invoke-virtual {p0, p1}, Lde/dealdoktor/app/fragments/DetailFragment$LoadCommentsTask;->doInBackground([Ljava/lang/String;)Ljava/lang/Boolean;

    move-result-object v0

    return-object v0
.end method

.method protected onPostExecute(Ljava/lang/Boolean;)V
    .locals 3
    .parameter "success"

    .prologue
    .line 465
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment$LoadCommentsTask;->this$0:Lde/dealdoktor/app/fragments/DetailFragment;

    #getter for: Lde/dealdoktor/app/fragments/DetailFragment;->contentWrapper:Landroid/widget/LinearLayout;
    invoke-static {v0}, Lde/dealdoktor/app/fragments/DetailFragment;->access$1(Lde/dealdoktor/app/fragments/DetailFragment;)Landroid/widget/LinearLayout;

    move-result-object v0

    iget-object v1, p0, Lde/dealdoktor/app/fragments/DetailFragment$LoadCommentsTask;->this$0:Lde/dealdoktor/app/fragments/DetailFragment;

    #getter for: Lde/dealdoktor/app/fragments/DetailFragment;->commentsWebView:Landroid/webkit/WebView;
    invoke-static {v1}, Lde/dealdoktor/app/fragments/DetailFragment;->access$3(Lde/dealdoktor/app/fragments/DetailFragment;)Landroid/webkit/WebView;

    move-result-object v1

    const/4 v2, 0x1

    invoke-virtual {v0, v1, v2}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;I)V

    .line 466
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment$LoadCommentsTask;->ctx:Ljava/lang/ref/WeakReference;

    invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lde/dealdoktor/app/fragments/DetailFragment;

    #calls: Lde/dealdoktor/app/fragments/DetailFragment;->loadCommentContent()V
    invoke-static {v0}, Lde/dealdoktor/app/fragments/DetailFragment;->access$4(Lde/dealdoktor/app/fragments/DetailFragment;)V

    .line 467
    return-void
.end method

.method protected bridge synthetic onPostExecute(Ljava/lang/Object;)V
    .locals 0
    .parameter

    .prologue
    .line 1
    check-cast p1, Ljava/lang/Boolean;

    invoke-virtual {p0, p1}, Lde/dealdoktor/app/fragments/DetailFragment$LoadCommentsTask;->onPostExecute(Ljava/lang/Boolean;)V

    return-void
.end method

.method protected onPreExecute()V
    .locals 2

    .prologue
    .line 454
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment$LoadCommentsTask;->ctx:Ljava/lang/ref/WeakReference;

    invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lde/dealdoktor/app/fragments/DetailFragment;

    #getter for: Lde/dealdoktor/app/fragments/DetailFragment;->contentWrapper:Landroid/widget/LinearLayout;
    invoke-static {v0}, Lde/dealdoktor/app/fragments/DetailFragment;->access$1(Lde/dealdoktor/app/fragments/DetailFragment;)Landroid/widget/LinearLayout;

    move-result-object v0

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->removeViewAt(I)V

    .line 455
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment$LoadCommentsTask;->ctx:Ljava/lang/ref/WeakReference;

    invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lde/dealdoktor/app/fragments/DetailFragment;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    #setter for: Lde/dealdoktor/app/fragments/DetailFragment;->builder:Ljava/lang/StringBuilder;
    invoke-static {v0, v1}, Lde/dealdoktor/app/fragments/DetailFragment;->access$2(Lde/dealdoktor/app/fragments/DetailFragment;Ljava/lang/StringBuilder;)V

    .line 457
    return-void
.end method
